
var p = document.getElementById("test");
var drag = false
p.value = 0;
p.addEventListener("mouseup", 
		   function() { 
		       if (drag) console.log("Final value=" + p.value);
		       drag = false;
		   });
p.addEventListener("mousedown", function() { drag = true; }); 
p.addEventListener("mousemove", function() { 
    if (drag) console.log("Draggin"); });

// setInterval(function() { p.value = ((p.value + 1) % 100) + 1;}, 100);

// EOF
